Brain Tumor Detection Using Image Processing Techniques
127
FIGURE 4.5
Adaptive thresholding techniques were applied on same brain MRI images.
The source image featured in this figure was selected from the dataset available
as open source on Kaggle [5].
In the next step, the most appropriate threshold value is determined.
Otsu’s method aims to identify the threshold that minimizes the weighted
within-class variance, essentially equivalent to maximizing the between-class
variance. The threshold value that meets this condition is the optimal thresh-
old value used in image segmentation. Otsu algorithm includes the following
steps [41]:
Algorithm 2 : Otsu Algorithm
1: Grayscale image is taken
2: The histogram of the grayscale image is calculated
3: The pixel density probabilities of the image are found
4: Initial values are assigned for wb(0), wf(0), µb(0), and µf(0).
5: The following steps are applied for all threshold values from t=0 to the
highest pixel intensity value
6: wb(t), wf(t), µb(t), and µf(t) values are updated
7: The between class variance σ2
B(t) is calculated
8: The threshold value of t at which σ2
B(t) is maximum is determined
Adaptive Thresholding Method
The adaptive thresholding method divides an image into smaller regions and
computes the threshold value for each region. Thus, every region will have
different threshold values. For each region, the threshold can be computed
either using arithmetic mean or Gaussian mean of the pixel intensities. In the
arithmetic mean, each pixel in the neighboring region contributes the same
amount to the threshold calculation. In the Gaussian mean, the pixel positions
play a significant part in the threshold calculation. Pixels that are further away
from the center of the region are less likely to contribute to the calculation.
Figure 4.5 demonstrates the resulting output images after applying adaptive
thresholding techniques.